Skip to content

fix(worker): real D1/KV IDs, correct migrations_dir, real origins - #1024

Merged
d-o-hub merged 1 commit into
mainfrom
fix/wrangler-real-resource-ids
Aug 21, 2026
Merged

fix(worker): real D1/KV IDs, correct migrations_dir, real origins#1024
d-o-hub merged 1 commit into
mainfrom
fix/wrangler-real-resource-ids

Conversation

@d-o-hub

@d-o-hub d-o-hub commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

What & why

Changes

  • migrations_dir../../packages/schema/migrations (resolves to repo root correctly)
  • database_id → real D1 do-epub-studio (dd47f3de-…)
  • KV CACHE_KV id → 5328daf8…
  • APP_BASE_URL / WEBAUTHN_*https://do-epub-studio.pages.dev

Verified

  • wrangler d1 migrations apply now resolves the migrations dir; all 12 already applied to remote.
  • pnpm check:deploy-config passes.

Note: this PR also triggers a fresh Cloudflare Pages production build via the Git integration, which picks up the dashboard-configured D1/KV bindings (the retry mechanism reuses stale config, so a fresh build is required for the bindings to attach).

PR #1019 wired migrations_dir as `../packages/schema/migrations`, which
resolves relative to apps/worker/ to the nonexistent apps/packages path —
`wrangler d1 migrations apply` could never find the 12 migrations. The
placeholder database_id/KV id also blocked migration application, and
APP_BASE_URL/WebAuthn still pointed at example.com/localhost.

Replace placeholders with the provisioned resources (D1 do-epub-studio,
KV CACHE_KV), correct migrations_dir to ../../packages/schema/migrations,
and set real Pages origins so no deploy path bakes in placeholder domains.

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@d-o-hub
d-o-hub requested a review from d-oit as a code owner August 21, 2026 10:07
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying do-epub-studio with  Cloudflare Pages  Cloudflare Pages

Latest commit: 443b7ae
Status: ✅  Deploy successful!
Preview URL: https://267a2eb6.do-epub-studio.pages.dev
Branch Preview URL: https://fix-wrangler-real-resource-i.do-epub-studio.pages.dev

View logs

@codacy-production

Copy link
Copy Markdown
Contributor

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@d-o-hub
d-o-hub merged commit e57c642 into main Aug 21, 2026
26 checks passed
@d-o-hub
d-o-hub deleted the fix/wrangler-real-resource-ids branch August 21, 2026 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants